<?php 
	session_start();
	include("ketnoi.php");
?>
<div class="main">

	<h5>TIN TỨC & SỰ KIỆN<HR ></h5>

</div>
  <?php
  if($_REQUEST['stt'] !="")
		$stt = $_REQUEST['stt'];
		
	$query = "select * from `".$dulieu."`.`tintuc` where MaTT = '".$stt."'";	
	$kq = mysql_query($query);
	$row = mysql_fetch_array($kq);

	$luotxem=$row['LanXem'];
	$luotxem++;
	$sql1 = "update `".$dulieu."`.`tintuc` set LanXem='$luotxem' where MaTT = '".$stt."'";	
	mysql_query($sql1);
  ?>
 <div class="news_content" style="padding-right:20px">
	<div class="news_header"><?php echo $row['TieuDeTT']?></div>  	 	 	 
	<div class="padding" style="padding-left:20px; font-style:italic; font-size:12px"> Ngày đăng : 
	<?php  echo substr($row['NgayDang'],8,2)."/".substr($row['NgayDang'],5,2)."/".substr($row['NgayDang'],0,4).' &nbsp;';  ?></div>
	<table class="news_detail">
		<tbody><tr>
			<td style="padding-left:20px"><br />
			  <?php echo $row['NoiDungTT']?>
            <br><br><br>
            </td>
		</tr></tbody></table>
	<br>
	<table class="news_bottom" width="100%" align="center">
		<tbody><tr>
			<th width="68%">Tin khác</th>
			<th width="32%">Ngày đăng</th>
		</tr>
		<?php

		$query_t = "select * from `".$dulieu."`.`tintuc`  order by MaTT desc";	
	    $kq_t = mysql_query($query_t);
		$n=1;
		while($row_t = mysql_fetch_array($kq_t)){
		if($row_t['MaTT'] != $stt && $n<7){	
		?>
		<tr>
			<td>»&nbsp;
			<a class="detail" href="c01<?php echo $row_t['MaTT']?>.html" title="<?php echo $row_t['TieuDeTT'] ?>"><?php echo $row_t['TieuDeTT'] ?></a> ...</td>
			<td><?php
	 echo substr($row_t['NgayDang'],8,2)."/".substr($row_t['NgayDang'],5,2)."/".substr($row_t['NgayDang'],0,4).' &nbsp;'; 
    ?></td>
		</tr>	
		<?php
			$n=$n+1;
		 } }

		 ?>
			</tbody></table>
<table width="100%" border="0">
  <tr>
    <td width="22%">&nbsp;</td>
    <td width="55%">&nbsp;</td>
    <td width="23%"><a href="tintuc-p1.html" style="font-style:italic; color:#06F; font-size:14px; text-decoration:none">xem tất cả</a></td>
  </tr>
</table>

</div>